package cn.leida.ruoyi.common.config;

import java.util.concurrent.atomic.AtomicBoolean;

/**
 * 读取项目相关配置
 *
 * @author ruoyi
 */
public class AppConfig {
    private static boolean sqlite = true;

    /**
     * 显示开发文档
     */
    private static AtomicBoolean showDoc = new AtomicBoolean(false);
    /**
     * 登录验证码校验
     */
    private static AtomicBoolean captchaEnabled = new AtomicBoolean(false);

    public static boolean sqlite() {
        return sqlite;
    }

    public static void changeDB(boolean sqlite) {
        AppConfig.sqlite = sqlite;
    }

    public static boolean showDoc() {
        return showDoc.get();
    }

    public static void showDoc(boolean show) {
        showDoc.set(show);
    }
    public static boolean captchaEnabled() {
        return showDoc.get();
    }

    public static void captchaEnabled(boolean validate) {
        captchaEnabled.set(validate);
    }

}
